package com.esoon.controller;

import com.esoon.service.CosDeptService;
import io.swagger.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName CosDeptController
 * @Description TODO 查询成功返回 dt_Code 查询失败返回 “查询失败”
 * @Author 2020/10/15 18:45
 * @Version 1.0
 **/
@Api(tags = "代理商管理")
@RestController
@RequestMapping("/v1/CosDept")
public class CosDeptController {
    private static final Logger logger;
    static {
        logger = LoggerFactory.getLogger(CosDeptController.class);
    }
    @Resource
    private CosDeptService cosDeptService;

    @ApiOperation(value = "代理商查询接口" , notes = "根据号码查询代理商代码")
    @RequestMapping(value = "/selectDtCodeByAni",method = RequestMethod.GET)
    public String selectDtCodeByAni(@ApiParam(value = "主叫号码",required = true) @RequestParam String ani){
        logger.info("invoking the 'dept' interface, interface url = '/v1/CosDept/selectDtCodeByAni' request parameters ani = {} " , ani);
        return cosDeptService.selectDtCodeByAni(ani);
    }
}
